Skip to content

test: cover event shorthand normalization gaps#68

Merged
overtrue merged 1 commit intomainfrom
codex/event-shorthand-test-gaps
Apr 2, 2026
Merged

test: cover event shorthand normalization gaps#68
overtrue merged 1 commit intomainfrom
codex/event-shorthand-test-gaps

Conversation

@overtrue
Copy link
Copy Markdown
Contributor

Summary

This change adds focused regression coverage for the event shorthand normalization fix merged on main.

Users were affected when shorthand event names such as put, get, delete, replica, and ilm needed to normalize to the persisted S3 notification event strings. The recent fix corrected the implementation, but there were still untested branches around how those normalized values interact with already-canonical inputs.

The root cause of the remaining test gap was that existing coverage only verified shorthand mapping in isolation. It did not verify that shorthand and canonical values collapse to the same persisted event after normalization, and it did not exercise the passthrough branch for already-canonical or custom event names.

This PR keeps scope tight by adding two unit tests in the event command:

  • one verifies shorthand and canonical event names deduplicate after normalization
  • one verifies non-shorthand values are preserved unchanged

Validation

I ran the required repository checks after the test additions:

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

@overtrue overtrue changed the title [codex] cover event shorthand normalization gaps test: cover event shorthand normalization gaps Mar 28, 2026
@overtrue overtrue marked this pull request as ready for review April 2, 2026 01:42
Copilot AI review requested due to automatic review settings April 2, 2026 01:42
@overtrue overtrue merged commit e576422 into main Apr 2, 2026
16 checks passed
@overtrue overtrue deleted the codex/event-shorthand-test-gaps branch April 2, 2026 01:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds regression tests to ensure event shorthand normalization produces the same persisted S3 event strings as already-canonical inputs, and that non-shorthand/custom event names pass through unchanged.

Changes:

  • Add a unit test confirming shorthand and canonical event names deduplicate after parse_event_list normalization.
  • Add a unit test confirming normalize_event_name preserves already-canonical and custom (non-shorthand) event strings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants